sixteen = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F']
r, g, b = map(int, input().split())
hex_r = hex(r)[2:].upper().zfill(2)
hex_g = hex(g)[2:].upper().zfill(2)
hex_b = hex(b)[2:].upper().zfill(2)
print('#' + hex_r + hex_g + hex_b)